package jsfl;
import jsfl.Fl;

extern class Document {
	public var accName:String;
	public function addDataToDocument(name:String,type:String,data:Dynamic):Void;
	public function addDataToSelection(name:String,type:String,data:Dynamic):Void;
	public function addFilter(filterName:String):Void;
	public function addItem(position:JSFLPoint,item:Item):Bool;
	public function addNewLine(startPoint:JSFLPoint,endPoint:JSFLPoint):Void;
	public function addNewOval(boundingRectangle:JSFLRect,?bSuppressFill:Bool,?bSuppressStroke:Bool):Void;
	public function addNewPublishProfile(?profileName:String):Int;
	public function addNewRectangle(boundingRectangle:JSFLRect,roundess:Int,?bSuppressFill:Bool,?bSuppressStroke:Bool):Void;
	public function addNewScene(?name:String):Void;
	public function addNewText(boundingRectangle:JSFLRect,?text:String):Void;
	public function align(alignMode:String,?bUseDocumentBounds:Bool):Void;
	public function allowScreens():Bool;
	public function arrange(arrangeMode:String):Void;
	public var as3AutoDeclare:Bool;
	public var as3Dialect:String;
	public var as3ExportFrame:Int;
	public var as3StrictMode:Bool;
	public var as3WarningsMode:Bool;
	public var asVersion:Int;
	public var autoLabel:Bool;
	public var backgroundColor:Dynamic;
	public function breakApart():Void;
	public function canEditSymbol():Bool;
	public function canRevert():Bool;
	public function canSaveAVersion():Bool;
	public function canTestMovie():Bool;
	public function canTestScene():Bool;
	public function changeFilterOrder(oldIndex:Int,newIndex:Int):Void;
	public function clipCopy():Void;
	public function clipCut():Void;
	public function clipPaste(bInPlace:Bool):Void;
	public function close(?bPromptToSaveChanges:Bool):Void;
	public function convertLinesToFills():Void;
	public function convertToSymbol(type:String,name:String,registrationPoint:String):SymbolInstance;
	public function crop():Bool;
	public var currentPublishProfile:String;
	public var currentTimeline:Int;
	public function deleteEnvelope():Bool;
	public function deletePublishProfile():Int;
	public function deleteScene():Bool;
	public function deleteSelection():Void;
	public var description:String;
	public function disableAllFilters():Void;
	public function disableFilter(filterIndex:Int):Void;
	public function disableOtherFilters(enabledFilterIndex:Int):Void;
	public function distribute(distributemode:String,?bUseDocumentBounds:Bool):Void;
	public function distributeToLayers():Void;
	public var docClass:String;
	public function documentHasData(name:String):Bool;
	public function duplicatePublishProfile(profileName:String):Int;
	public function duplicateScene():Bool;
	public function duplicateSelection():Void;
	public function editScene(index:Int):Void;
	public function enableAllFilters():Void;
	public function enableFilter(filterIndex:Int):Void;
	public function enterEditMode(?editMode:String):Void;
	public function exitEditMode():Void;
	public function exportPNG(?fileURI:String,?bCurrentPNGSettings:Bool,?bCurrentFrame:Bool):Bool;
	public function exportPublishProfile(fileURI:String):Void;
	public function exportSWF(?fileURI:String,?bCurrentSettings:Bool):Void;
	public var forceSimple:Bool;
	public var frameRate:Float;
	public function getAlignToDocument():Bool;
	public function getBlendMode():String;
	public function getCustomFill(?objectToFill:String):Fill;
	public function getCustomStroke(locationOfStroke:String):Stroke;
	public function getDataFromDocument(name:String):Dynamic;
	public function getElementProperty(propertyName:String):Dynamic;
	public function getElementTextAttr(attrName:String,?startIndex:Int,?endIndex:Int):Dynamic;
	public function getFilters():Array<Filter>;
	public function getMetadata():String;
	public function getMobileSettings():String;
	public function getPlayerVersion():String;
	public function getSelectionRect():JSFLRect;
	public function getTextString(?startIndex:Int,?endIndex:Int):String;
	public function getTimeline():Timeline;
	public function getTransformationPoint():JSFLPoint;
	public function group():Void;
	public var height:Int;
	public var id:Int;
	public function importFile(fileURI:String,?importToLibrary:Bool):Void;
	public function importPublishProfile(fileURI:String):Int;
	public function importSWF(fileURI:String):Void;
	public function intersect():Bool;
	public var library:Library;
	public var livePreview:Bool;
	public function match(bWidth:Bool,bHeight:Bool,?bUseDocumentBounds:Bool):Void;
	public function mouseClick(position:JSFLPoint,bToggleSel:Bool,bShiftSel:Bool):Void;
	public function mouseDblClk(position:JSFLPoint,bAltDown:Bool,bShiftDown:Bool,bShiftSelect:Bool):Void;
	public function moveSelectedBezierPointsBy(delta:JSFLPoint):Void;
	public function moveSelectionBy(distanceToMove:JSFLPoint):Void;
	public var name:String;
	public function optimizeCurves(smoothing:Int,bUseMultiplePasses:Bool):Void;
	public var path:String;
	public function publish():Void;
	public var publishProfiles:Array<String>;
	public function punch():Bool;
	public function removeAllFilters():Void;
	public function removeDataFromDocument(name:String):Void;
	public function removeDataFromSelection(name:String):Void;
	public function removeFilter(filterIndex:Int):Void;
	public function renamePublishProfile(?profileNewName:String):Bool;
	public function renameScene(name:String):Bool;
	public function reorderScene(sceneToMove:Int,sceneToPutItBefore:Int):Void;
	public function resetOvalObject():Void;
	public function resetRectangleObject():Void;
	public function resetTransformation():Void;
	public function revert():Void;
	public function revertToLastVersion():Bool;
	public function rotateSelection(angle:Float,?rotationPoint:String):Void;
	public function save(?bOkToSaveAs:Bool):Bool;
	public function saveAndCompact(?bOkToSaveAs:Bool):Bool;
	public function saveAVersion():Bool;
	public function scaleSelection(xScale:Float,yScale:Float,?whichCorner:String):Void;
	public var screenOutline:ScreenOutline;
	public function selectAll():Void;
	public var selection:Array<Dynamic>;
	public function selectNone():Void;
	public function setAlignToDocument(bToStage:Bool):Void;
	public function setBlendMode(mode:String):Void;
	public function setCustomFill(fill:Fill):Void;
	public function setCustomStroke(stroke:Stroke):Void;
	public function setElementProperty(property:String,value:Int):Void;
	public function setElementTextAttr(attrName:String,attrValue:String,?startIndex:Int,?endIndex:Int):Bool;
	public function setFillColor(color:Dynamic):Void;
	public function setFilterProperty(property:String,filterIndex:Int,value:String):Void;
	public function setFilters(filterArray:Array<Filter>):Void;
	public function setInstanceAlpha(opacity:Int):Void;
	public function setInstanceBrightness(brightness:Int):Void;
	public function setInstanceTint(color:Dynamic,strength:Int):Void;
	public function setMetadata(strMetadata:String):Bool;
	public function setMobileSettings(xmlString:String):Bool;
	public function setOvalObjectProperty(propertyName:String,value:Dynamic):Void;
	public function setPlayerVersion(version:String):Bool;
	public function setRectangleObjectProperty(propertyName:String,value:Dynamic):Void;
	public function setSelectionBounds(boundingRectangle:JSFLRect,?bContactSensitiveSelection:Bool):Void;
	public function setSelectionRect(rect:JSFLRect,?bReplaceCurrentSelection:Bool,bContactSensitiveSelection:Bool):Void;
	public function setStroke(color:Dynamic,size:Float,strokeType:String):Void;
	public function setStrokeColor(color:Dynamic):Void;
	public function setStrokeSize(size:Float):Void;
	public function setStrokeStyle(strokeType:String):Void;
	public function setTextRectangle(boundingRectangle:JSFLRect):Bool;
	public function setTextSelection(startIndex:Int,endIndex:Int):Void;
	public function setTextString(setTextString:String,?startIndex:Int,?endIndex:Int):Bool;
	public function setTransformationPoint(transformationPoint:JSFLPoint):Void;
	public var silent:Bool;
	public function skewSelection(xSkew:Float,ySkew:Float,?whichEdge:String):Void;
	public function smoothSelection():Void;
	public function space(direction:String,?bUseDocumentBounds:Bool):Void;
	public function straightenSelection():Void;
	public function swapElement(name:String):Void;
	public function swapStrokeAndFill():Void;
	public function synchronizeWithHeadVersion():Bool;
	public function testMovie():Void;
	public function testScene():Void;
	public var timelines:Array<Timeline>;
	public function traceBitmap(threshold:Int,minimumArea:Int,curveFit:String,cornerThreshold:String):Void;
	public function transformSelection(a:Float,b:Float,c:Float,d:Float):Void;
	public function unGroup():Void;
	public function union():Bool;
	public function unlockAllElements():Void;
	public var viewMatrix:Matrix;
	public var width:Int;
	public function xmlPanel(fileURI:String):Dynamic<String>;
	public var zoomFactor:Int;
	
	//CS4
	#if cs4
	public function addNewPrimitiveOval(boundingRectangle:JSFLRect, ?bSpupressFill:Bool, ?bSuppressStroke:Bool ):Void;
	public function addNewPrimitiveRectangle(boundingRectangle:JSFLRect, roundness:Int, ?bSuppressFill:Bool, ?bSuppressStroke:Bool ):Void;
	public function exportPublishProfileString(profileName:String):String;
	public function externalLibraryPath():String;
	public function importPublishProfileString(xmlString:String):Bool;
	public var libraryPath:String;
	public var pathURI:String;
	public function rotate3DSelection(xyzCoordinate:JSFLPoint3D, bGlobalTransform:Bool):Void;
	public function setStageVanishingPoint(point:JSFLPoint):Void;
	public function setStageViewAngle(angle:Float):Void;
	public var sourcePath:String;
	public function translate3DCenter(xyzCoordinate:JSFLPoint3D):Void;
	public function translate3DSelection(xyzCoordinate:JSFLPoint3D, bGlobalTransform:Bool):Void;	
	#end
}